package com.wtc.codeblock;

public class CodeBlock01 {
    public static void main(String[] args) {
        Movie movie = new Movie("星际穿越", 150, "诺兰");
        Movie movie2 = new Movie("星际穿越", 150);
        Movie movie3 = new Movie("星际穿越");
    }
}
class Movie {
    private String name;
    private double price;
    private String director;
    {
        System.out.println("广告开始》》》");
        System.out.println("电影开始》》》");
    }

    public Movie(String name) {
        this.name = name;
    }

    public Movie(String name, double price) {
        this.name = name;
        this.price = price;
    }

    public Movie(String name, double price, String director) {
        this.name = name;
        this.price = price;
        this.director = director;
    }
}
